#ifndef LOGINWINDOW_H
#define LOGINWINDOW_H

#include <QMainWindow>
#include <QLineEdit>
#include <QPushButton>
#include <QLabel>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QMessageBox>
#include "database.h"

class LoginWindow : public QMainWindow
{
    Q_OBJECT

public:
     explicit LoginWindow(Database *db, QWidget *parent = nullptr);
    ~LoginWindow();

private slots:
    void onLoginClicked();
    void onRegisterClicked();

private:
    void setupUI();
    void createConnections();

    QWidget *centralWidget;
    QVBoxLayout *mainLayout;
    QLineEdit *usernameEdit;
    QLineEdit *passwordEdit;
    QPushButton *loginButton;
    QPushButton *registerButton;
    Database *db;
};

#endif // LOGINWINDOW_H 
